package com.ross.mode.handler;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @version 1.0.0
 * @className: JdkProxyHandler
 * @description:
 * @author: zhangjunfa
 * @date: 2023/3/31 11:58
 */
public class JdkProxyHandler implements InvocationHandler {
    private Object userInterface;

    public JdkProxyHandler(Object userInterface) {
        this.userInterface = userInterface;
    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("开始代理：操作数据开始");
        return method.invoke(userInterface, args);
    }
}
